package com.util;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;

public class HttpUtil {
	public static void setSession(String key,Object value){
		ActionContext actionContext = ActionContext.getContext();
		Map <String,Object> session = actionContext.getSession();
		session.put(key, value);
		/*HttpServletRequest request = ServletActionContext.getRequest();
	    HttpServletResponse response = ServletActionContext.getResponse();       
	    HttpSession session = request.getSession();  
	    session.setAttribute(key, value);*/
	   // User u = (User)session.getAttribute("user");
	    //System.out.println(u.getName());
	}
	
	public static void clearSession(){
		ActionContext actionContext = ActionContext.getContext();
		Map <String,Object> session = actionContext.getSession();
		session.clear();
	}
}
